home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_shs_intro_ice.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  137 lines

  1. # Jones 3D Cog Script
  2. #
  3. # shs_Intro_Ice.cog   Intro the ice chickens.  
  4. #
  5. # [JWC]
  6. #
  7. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  8. #
  9. # ========================================================================================
  10.  
  11. symbols
  12.  
  13. message     startup
  14. message     entered
  15.  
  16. sector        music
  17.  
  18. sound         music0=mus_gen_eerie1.wav                local
  19. sound        in_whatname=Ss08j01.wav                    local
  20.  
  21. surface     trigger
  22.  
  23. thing       in_mk1   
  24. thing        player            local
  25. thing       IceCam
  26. thing        IceCam_t1
  27. thing        IceCam_t2
  28. thing         dummycam 
  29. thing        icechicken
  30.  
  31. cog            chickenCutsceneCog
  32.  
  33. int            curCam            local
  34. int            filter=0        local
  35. int            played=0        local
  36. int            in_track0        local
  37.  
  38. end
  39.  
  40. # ========================================================================================
  41.  
  42. code
  43.  
  44. startup:
  45.     
  46.           
  47.     player = GetLocalPlayerThing();
  48.     return;
  49.  
  50.     
  51. entered:
  52.     
  53.     if ((GetSenderRef() == trigger) && (filter == 0)) 
  54.     {
  55.         Print("Entered");
  56.                 
  57.         MakeMeStop();
  58.         StartCutscene(1);
  59.          
  60.         # Prep camera & cut...
  61.         curCam = GetCurrentCamera();   
  62.         SetCameraLookInterp(2, 0); # no pan & tilt
  63.         SetCameraPosInterp(2, 0); # no dolly
  64.         SetCameraFocus(2, IceCam);
  65.         SetCameraSecondaryFocus(2, IceCam_t1);
  66.         SetCurrentCamera(2);
  67.         ResetCameraFOV(0, 0.0);
  68.         Sleep(0.01);
  69.         SetCameraFOV(60, 1, 2.0);
  70.         
  71.         # Puts away lighter
  72.         If ((GetCurWeapon(player) > 12) || (GetCurItem(player) != 0))
  73.         {
  74.             DeselectWeapon(player);
  75.         }
  76.         Sleep(0.5);                            
  77.         filter=1;     # play only once
  78.         
  79.         AttachThingToThing(icecam_t1, icechicken);
  80.         SendMessage(chickenCutsceneCog, user0);        // Make the ice chicken detach and fall.
  81.        
  82.         Sleep(2.0);                                    // Wait a bit to give the player a chance to see this weirdo.
  83.         DetachThing(icecam_t1);
  84.         SendMessage(chickenCutsceneCog, user1);        // Make the Ice chicken roll away.
  85.            TeleportThing(player, in_mk1); 
  86.  
  87.         # Swing back to indy
  88.         SetCameraLookInterp(2, 1); # pan & tilt
  89.         SetCameraInterpSpeed(2, 2.0);
  90.         Sleep(0.01);
  91.         SetCameraSecondaryFocus(2, IceCam_t2);
  92.         sleep(2.0);    # allow    camera to get to indy
  93.  
  94.         # Indy draws weapon
  95.         
  96.         If(GetCurWeapon(player) > 0)
  97.         {
  98.             SelectWeapon(player, GetCurWeapon(player));
  99.         }
  100.         else
  101.         {
  102.             SelectWeapon(player, 3);    # temp
  103.             #SelectWeapon(player, GetLastWeapon());
  104.         }
  105.         
  106.         # "What in the name..."
  107.         PlayVoice(player, in_whatname, 1.0, 1);
  108.         
  109.         
  110.         # Return control
  111.         SetCameraPosition(1, GetThingPos(dummycam)); # prep to swing back to follow-cam
  112.         SetCameraLookInterp(2, 0); # kill pan & tilt mode
  113.         SetCameraPosInterp(2, 0); # kill dolly mode
  114.         sleep(.01);
  115.         ResetCameraFOV(0, 0.0);
  116.         SetCurrentCamera(curCam);                          
  117.         ClearActorFlags(player, 0x200000); # player in control
  118.         EndCutscene();
  119.     }
  120.     # Some eerie music...
  121.     
  122.     if ((GetSenderRef() == music) && (played == 0))
  123.     {
  124.         played=1;
  125.         PlaySoundLocal(music0, 1.0, 0.0, 0x0, 0);
  126.     }
  127.  
  128. return;
  129.      
  130.   
  131.  
  132. end
  133.  
  134.  
  135.  
  136.  
  137.